import 'package:flutter/material.dart';
import 'package:live_client/views/components/RouteAnimation.dart';
import 'package:live_client/views/page/NavigationMain.dart';

class StartPage extends StatefulWidget {
  StartPage();

  @override
  _StartPageState createState() => _StartPageState();
}

class _StartPageState extends State<StartPage> {
  var _duration = Duration(milliseconds: 1500);
  @override
  void initState() {
    super.initState();
    Future.delayed(_duration).then(
      (e) {
        Navigator.pushReplacement(
          context,
          CustomRouteJianBian(NavigationMain()),
        );
      },
    );
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Stack(
        fit: StackFit.expand,
        children: [
          Container(
            child: Image.asset(
              "assets/images/start.gif",
              fit: BoxFit.cover,
            ),
          )
        ],
      ),
    );
  }
}
